package com.woniu.api;

import com.woniu.dto.AllHisDiseaseDto;
import com.woniu.dto.HisDiseaseDto;
import com.woniu.dto.PageDTO;
import com.woniu.param.AddHisDiseaseParam;
import com.woniu.param.ListHisDiseaseParam;
import com.woniu.param.ModifyDiseaseParam;
import com.woniu.util.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@FeignClient(
        contextId = "patient-2",
        value = "patient",
        path = "/patient"
)
@Api(tags = "疾病表接口")
public interface HisDiseaseQueryApi {
    //新增疾病
    @ApiOperation("新增疾病表")
    @PostMapping("addDisease")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "addHisDiseaseParam",value = "疾病信息",required = false,
//                    dataType = "AddHisDiseaseParam")
//    })
    Result<HisDiseaseDto> newDiseases(@RequestBody AddHisDiseaseParam addHisDiseaseParam);

    //修改疾病
    @PutMapping("modifyDisease")
    @ApiOperation("修改疾病方法")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "modifyDiseaseParam",value = "疾病信息包含疾病ID",required = false,
//                    dataType = "ModifyDiseaseParam")
//    })
    Result<HisDiseaseDto> modifyDisease(@RequestBody ModifyDiseaseParam modifyDiseaseParam);

    //删除疾病表
    @DeleteMapping("deletedisease")
    @ApiOperation("删除疾病表")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "ids",value = "疾病ID集合",required = false,
//                    dataType = "ArrayList")
//    })
    Result<Boolean> deleteDisease(@RequestParam("ids") ArrayList<Integer> ids);

    //查询病历表
    @ApiOperation("查询疾病表")
    @GetMapping("getdisease")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "listHisDiseaseParam",value = "疾病表信息",required = false,
//                    dataType = "ListHisDiseaseParam")
//    })
    Result<AllHisDiseaseDto> queryMedicalRecords(@RequestBody ListHisDiseaseParam listHisDiseaseParam);
}
